import Taro from "@tarojs/taro";
import { useEffect } from "react";
import { View, Image, Text, Button } from "@tarojs/components";
import bjt1 from "../../assets/images/bjt1.jpg";
import bjt2 from "../../assets/images/bjt2.png";
import "./welcome.scss";

const Welcome = () => {
  useEffect(() => {
    Taro.hideHomeButton(); // 隐藏Home按钮
  });

  // 去登录
  const goToLogin = () => {
    Taro.reLaunch({
      url: "/pages/login/login",
    });
  };

  return (
    <View className="container">
      <Image src={bjt2} className="bgImag" />
      <Text className="xzyText">“心之右”</Text>
      <Text className="xzLeft">“心脏在左</Text>
      <Text className="xzRight">你在我右”</Text>
      <Image src={bjt1} className="bgImag" />
      <Button onClick={() => goToLogin()} className="goToLogin">
        去登录
      </Button>
    </View>
  );
};

export default Welcome;
